<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-form" id="table-list">
                <table class="layui-table">
                    <thead>
                    <tr>
                        <td>ID</td>
                        <td>昵称</td>
                        <td>手机号</td>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="list" item="val" key="key"}
                    <tr>
                        <td><input type="radio" name="admin_id" rel="{$val.nickname}" value="{$val.admin_id}">{$val.admin_id}</td>
                        <td>{$val.nickname}（{$val.role_name}：{$val.account}）</td>
                        <td>{$val.mobile}</td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                <div class="paging">{$page|raw}</div>
            </div>
            <div class="layui-form-item layui-form-text">
                <div class="layui-input-block">
                    <input type="submit" class="layui-btn layui-btn-normal w100" id="select_btn" value="确定选择" />
                </div>
            </div>
        </div>
    </div>
</div>
<script src="__STATIC__/admin/js/jquery-3.6.0.min.js"></script>
<script type="text/javascript">
    $(document).ready(function (e) {
        $("#select_btn").click(function () {
            $("input[name='admin_id']").each(function (a) {
                if ($(this).prop("checked") == true) {
                    selectCallBack('admin_id', 'nickname', $(this).val(), $(this).attr('rel'));
                    selectCallBack('target_id', 'target_name', $(this).val(), $(this).attr('rel'));
                }
            });
        });
    });
</script>